# Contributor: Milan P. Stanić <mps@arvanta.net>
# Maintainer: Milan P. Stanić <mps@arvanta.net>
pkgname=libudev-zero
pkgver=1.0.1
pkgrel=0
pkgdesc="libudev replacement to use whatever device manager"
url="https://github.com/illiliti/libudev-zero/"
arch="all"
license="ISC"
options="!check" # no tests
makedepends="linux-headers"
provides="udev"
replaces="udev"
provider_priority=20
subpackages="$pkgname-dev $pkgname-helper"
source="$pkgname-$pkgver.tar.gz::https://github.com/illiliti/libudev-zero/archive/$pkgver.tar.gz"

build() {
	make PREFIX=/usr
	 cc -o libudev-zero-helper contrib/helper.c
}

package() {
	make DESTDIR=$pkgdir PREFIX=/usr install
	rm -f $pkgdir/usr/lib/libudev.a
}
helper() {
	pkgname="libudev-zero hotplugging helper"
	depends=""
	install -Dm755 $builddir/libudev-zero-helper \
		"$subpkgdir"/usr/libexec/libudev-zero-helper
}

sha512sums="
fb2c0350ed6e4a8c2b1e35c2c132d97e37f5e79a6e50f607ae5dda3a27ef02e4522d11bdb3114e547af27fcc4e140a962b56a8a9e7438b3182d2f8b666c55941  libudev-zero-1.0.1.tar.gz
"
